<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Scout Report</title>

    <!-- NCC favicon --> 
    <link href="inc-scoutsuite/favicon.ico" rel="icon" type="image/x-icon">

    <!-- Bootstrap core CSS -->
    <link href="inc-bootstrap/css/bootstrap.min.css" rel="stylesheet">
    
    <!-- Bootstrap theme -->
    <link id="bootstrap-theme" href="inc-bootstrap/css/bootstrap-light.min.css" rel="stylesheet">
    
    <!-- Fontawesome CSS -->
    <link href="inc-fontawesome/css/all.min.css" rel="stylesheet">
    <!-- Fallback fonts to solve CORS issue-->
    <link href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" rel="stylesheet">
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->

    <!-- jQuery -->
    <script src="inc-jquery/jquery-3.3.1.min.js"></script>

    <!-- Handlebars -->
    <script src="inc-handlebars/handlebars-v3.0.0.js"></script>

    <!-- Scout -->
    <script src="inc-scoutsuite/scoutsuite.js"></script>
    <script src="inc-scoutsuite/pagination.js"></script>
    <script src="inc-scoutsuite/provider.js"></script>
    <script src="inc-scoutsuite/helpers.js"></script>
    <link href="inc-scoutsuite/css/scoutsuite.css" rel="stylesheet">
    <link id="scout-theme" href="inc-scoutsuite/css/scoutsuite-light.css" rel="stylesheet">
</head>

<body>

    <!------------------>
    <!-- Fixed navbar -->
    <!------------------>

    <div class="navbar fixed-top navbar-expand-md bg-primary" role="navigation" id="metadata.list"></div>

    <!--------------->
    <!-- Container -->
    <!--------------->

    <div class="container theme-showcase mt-5 pt-5" id="container-user">

        <!-- AWS account ID -->
        <div class="row justify-content-center" id="account_id.details">
            <h4>
                <div class="list-group-item-text std-size" onclick="toggle_element('scout_display_account_id_on_all_pages_form')" >
                    <span id="account_id"></span>
                </div>
                <div id="scout_display_account_id_on_all_pages_form" class="list-group-item-text center std-size" style="text-align: center; display: none">
                    <label><input id="scout_display_account_id_on_all_pages" type="checkbox" value="">Display account ID on all pages</label>
                </div>
            </h4>
        </div>

        <!-- Title section -->
        <!--<div id="section_title-div">-->
        <div id="section_title-div" style="display:flex;flex-direction:column;position:relative;">
            <h2 id="section_title-h2"></h2>
            <div id="findings_download_button" style="display:none;position:relative;margin-left:auto">
                <button id="findings_download_csv_button" type="button" class="btn btn-secondary"><i class="fa fa-download"></i>CSV</button>
                <button id="findings_download_json_button" type="button" class="btn btn-secondary"><i class="fa fa-download"></i>JSON</button>
            </div>
        </div>

        <!-- One column container -->
        <div class="row">
            <div class="col-sm-12 w-100" id="single-column">
            </div>

            <!-- Two columns container -->
            <div class="row w-100">
                <div class="col-sm-3 w-100 text-overflow" id="double-column-left"></div>
                <div class="col-sm-9 w-100 pr-0" id="double-column-right"></div>
            </div>

            <!-- CONTENTS PLACEHOLDER -->

            <div class="modal-backdrop fade show" id="please-wait-backdrop"></div>
            <div class="modal fade show" tabindex="-1" role="dialog" id="please-wait-modal" style="padding-right: 17px; display: block;" aria-modal="true">
                <div class="modal-dialog modal-dialog-centered" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <h5 class="modal-title">Please wait</h5>
                        </div>
                        <div class="modal-body">
                            <div class="row list-group-item">
                                <p>Loading data, this may take a while...</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- About-run dashboard -->
            <script id="last_run.details.template" type="text/x-handlebars-template">
                <h4>
                    <div class="row std-size" id="last_run.details">
                        <div class="list-group-item active ml-3">
                            <div class="list-group-item-heading">Dashboard</div>
                        </div>
                        <div class="accordion" id="last_run">
                            <a class="card">
                                <div class="card-header card-header-dark">Service
                                    <div class="col-sm-2 float-right" style="text-align: center">Checks</div>
                                    <div class="col-sm-2 float-right" style="text-align: center">Findings</div>
                                    <div class="col-sm-2 float-right" style="text-align: center">Rules</div>
                                    <div class="col-sm-2 float-right" style="text-align: center">Resources</div>
                                </div>
                            </a>
                            {{#each items.summary}}
                            <div class="card finding-title finding-title-{{dashboard_color level rules_count rules_count}} plain-link">
                                <a href="#services.{{@key}}.findings">
                                    <div class="finding-title card-header">
                                        <i class="fa finding-badge finding-badge-{{dashboard_color max_level checked_items flagged_items}}"></i>
                                        {{makeTitle @key}}
                                        <div class="col-sm-2 float-right" style="text-align: center">{{checked_items}}</div>
                                        <div class="col-sm-2 float-right" style="text-align: center">{{flagged_items}}</div>
                                        <div class="col-sm-2 float-right" style="text-align: center">{{rules_count}}</div>
                                        <div class="col-sm-2 float-right" style="text-align: center">{{resources_count}}</div>
                                    </div>
                                </a>
                            </div>
                            {{/each}}
                        </div>
                    </div>
                </h4>
            </script>

            <!-- Service-specific dashboards -->
            <div class="row">
                <div class="col-sm-12" id="services.id.findings.details">
                    <script id="services.id.findings.details.template" type="text/x-handlebars-template">
                        {{#each items}}
                        {{> dashboard service_name = @key}}
                        {{/each}}
                    </script>
                </div>
            </div>

        </div> <!-- /container -->

        <!-- Bootstrap core JavaScript, placed at the end of the document so the pages load faster -->
        <script src="inc-bootstrap/js/bootstrap.min.js"></script>

        <!-- Display dashbord -->
        <script>
            loadMetadata();
        </script>

        <!-- Paging section -->
        <div id="section_paging-div" style="display:flex;flex-direction:column">
            <h2 id="section_paging-h2"></h2>
            <div id="paging_buttons" style="margin:auto">
                <button id="page_backward" type="button" class="btn btn-secondary" disabled><i class="fa fa-arrow-circle-left"></i> Back</button>
                <button id="page_forward" type="button" class="btn btn-secondary">Next <i class="fa fa-arrow-circle-right"></i></button>                
            </div>
        </div>

        <!-- Used by showPopup -->
        <div id="modal-container" class="modal fade" tabindex="-1" role="dialog"></div>

    </div>

</body>


</html>
